﻿using System.ComponentModel.DataAnnotations;
using GamFi.Admin.API.Domain.Common;

namespace GamFi.Admin.API.Domain.Entities;

public class Token: BaseAuditableEntity
{
    /// <summary>
    /// Название
    /// </summary>
    [MaxLength(50)]
    public string Name { get; set; } = default!;
    
    /// <summary>
    /// Цена токена
    /// </summary>
    public double TokenPrice { get; set; }
    
    /// <summary>
    /// Трёхбуквенный код токена
    /// </summary>
    [MaxLength(3)]
    public string TokenSymbol { get; set; } = default!;
    
    /// <summary>
    /// ИД чейна
    /// </summary>
    public Guid ChainId { get; set; }
    
    /// <summary>
    /// Чейн
    /// </summary>
    public Chain Chain { get; set; } = default!;
    
    /// <summary>
    /// Целевая сумма
    /// </summary>
    public double TargetedRaise { get; set; }
    
    /// <summary>
    /// Текущая сумма
    /// </summary>
    public double TotalRaise { get; set; }
    
    /// <summary>
    /// Текст
    /// </summary>
    [MaxLength(500)]
    public string TokenSummary { get; set; } = default!;
    
    /// <summary>
    /// ИД картинки
    /// </summary>
    public Guid? ImageId { get; set; }
    
    /// <summary>
    /// nav-prop
    /// </summary>
    public Image Image { get; set; } = default!;

    /// <summary>
    /// Связь с покупками
    /// </summary>
    public ICollection<Purchase>? Purchases { get; set; }
}